package com.tyc.register.config;

import com.tyc.register.model.Color;
import com.tyc.register.model.Gray;
import org.springframework.beans.factory.FactoryBean;

public class MyFactoryBean implements FactoryBean<Color> {

    @Override
    public Color getObject() throws Exception {
        return new Gray();
    }

    @Override
    public Class<?> getObjectType() {
        return Gray.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
